#ifndef __FIBER_OPTIC_H
#define __FIBER_OPTIC_H

#include "stdio.h"    
#include "bsp_sys.h"
#include "bsp_usart.h"      
#include "SEGGER_RTT.h"

typedef struct _fiber_optic {
    uint8_t flag_trig;
    uint32_t count;
    void (*init)(void);
    void (*write)(uint32_t);
    uint32_t (*read)(void);
    uint32_t (*ctrl)(uint8_t);
} fiber_optic_t;
 
extern fiber_optic_t* fiber_optic_dev(void); /* 设备外接口 */
extern void fiber_optic_clear_count(void);   /* 清除计数值 */

#endif
